package cn.edu.bupt.ch5_2.mapper;

import cn.edu.bupt.ch5_2.dto.ProductWithComments;
import cn.edu.bupt.ch5_2.entity.Product;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

public interface ProductMapper extends BaseMapper<Product> {
    //一对多级联----嵌套Select查询方案示例
    List<ProductWithComments> findAllWithComments();
    //一对多级联----嵌套 结果映射方案示例
    List<ProductWithComments> findAllWithCommentsV2();
}
